package com.lhstack.opensearch.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.lhstack.opensearch.annotation.Document;
import com.lhstack.opensearch.annotation.Id;

/**
 * @Description TODO
 * @Copyright: Copyright (c) 2022 ALL RIGHTS RESERVED.
 * @Author lhstack
 * @Date 2022/6/21 14:45
 * @Modify by
 */
@Document(value = "._______mess_age___en__ti__ty___",mappingPath = "classpath:/mappings/MessageEntity.json",templatePath = "classpath:/searchTemplates/MessageEntity.yaml")
public class MessageEntity {

    @Id
    @JSONField(serialize = false,deserialize = false)
    private String id;

    private String title;

    @JSONField(name = "sub_title")
    private String subTitle;

    private String content;

    public String getId() {
        return id;
    }

    public MessageEntity setId(String id) {
        this.id = id;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public MessageEntity setTitle(String title) {
        this.title = title;
        return this;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public MessageEntity setSubTitle(String subTitle) {
        this.subTitle = subTitle;
        return this;
    }

    public String getContent() {
        return content;
    }

    public MessageEntity setContent(String content) {
        this.content = content;
        return this;
    }

    @Override
    public String toString() {
        return "MessageEntity{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", subTitle='" + subTitle + '\'' +
                ", content='" + content + '\'' +
                '}';
    }
}
